package com.neusoft.yuejian_6.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;

import com.neusoft.yuejian_6.R;
import com.squareup.picasso.Picasso;

import static com.neusoft.yuejian_6.base.Constant.PHOTO_URL;

public class MasterInfoActivity extends Activity {


    private ImageView master_pic;
    private  TextView master_name;
    private TextView master_intro;
    private TextView master_age;
    private TextView master_sex;

    private int master_id;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏

        setContentView(R.layout.activity_master_info);
        initView();
        getMasterData();
    }

    private void getMasterData() {
        Bundle bundle = this.getIntent().getExtras();
        String masterintro = bundle.getString("master_intro");
        String mastername = bundle.getString("master_name");
        String masterage = bundle.getString("master_age");
        String mastersex=bundle.getString("master_sex");

        // int tprice = bundle.getInt("t_price");
        String tpic = PHOTO_URL + bundle.getString("master_pic");

        //String ttime = bundle.getString("t_time");
        //System.out.print("taddress");
        master_intro.setText(masterintro);
        master_name.setText(mastername);
        master_age.setText(mastername);
        master_sex.setText(mastersex);
        // t_price.setText(tprice+"");
        //System.out.print("train_intro");
        //   t_time.setText(ttime);
        Picasso.with(this).load(tpic).into(master_pic);
    }


    private void initView() {

        master_pic = (ImageView) findViewById(R.id.master_pic);
        master_intro = (TextView) findViewById(R.id.master_intro);
        master_name = (TextView) findViewById(R.id.master_name);
        master_age = (TextView) findViewById(R.id.master_age);
        master_sex = (TextView) findViewById(R.id.master_sex);
    }

    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */

}


